<#include "/layout/layout.ftl">
<@layout title="主页" active="home">

    <#assign css>
        <style>
        </style>
    </#assign>
    <#assign js>

        <!-- SparkLine -->
        <script src="/assets/vendor/jquery-sparkline/jquery.sparkline.min.js"></script>
        <!-- jVectorMap -->
        <script src="/assets/vendor/jvectormap/jquery-jvectormap-1.2.2.min.js"></script>
        <script src="/assets/vendor/jvectormap/jquery-jvectormap-world-mill-en.js"></script>
        <script src="/assets/vendor/chart.js/Chart.min.js"></script>
        <script src="/assets/js/dashboard.js"></script>

    </#assign>
    <script>
        layui.use('layer', function(){
            var layer = layui.layer;
        });
    </script>

    <!-- Content Header (Page header) -->
    <section class="content-header">
        <h1>
            首页
            <small>一切从这里开始</small>
        </h1>
        <ol class="breadcrumb">
            <li><a href="/"><i class="fa fa-home"></i> 分站后台</a></li>
            <li class="active"> 控制台</li>
        </ol>
    </section>

    <!-- Main content -->

    <section class="content">
        <!-- Info boxes -->
        <div class="row">
            <div class="col-md-3 col-sm-4 col-xs-6" style="width: 20%">
                <div class="info-box">
                    <span class="info-box-icon bg-aqua"><i class="fa fa-snowflake-o"></i></span>

                    <div class="info-box-content">
                        <span class="info-box-text">分站总交易</span>
                        <span class="info-box-number">
                            <#if index.agentIndexTop1.agentMoney??>
                                ${index.agentIndexTop1.agentMoney?string('0.00')!}
                            <#else >
                                0.00
                            </#if>
                        </span>
                    </div>
                    <!-- /.info-box-content -->
                </div>
                <!-- /.info-box -->
            </div>
            <!-- /.col -->
            <div class="col-md-2 col-sm-4 col-xs-6" style="width: 20%">
                <div class="info-box">
                    <span class="info-box-icon bg-red"><i class="fa fa-google-plus"></i></span>

                    <div class="info-box-content">
                        <span class="info-box-text">分站总收益</span>
                        <span class="info-box-number">
                            <#if index.agentIndexTop1.agentIncome??>
                                ${index.agentIndexTop1.agentIncome?string('0.00')!}
                            <#else >
                                0.00
                            </#if>
                        </span>
                    </div>
                    <!-- /.info-box-content -->
                </div>
                <!-- /.info-box -->
            </div>
            <div class="col-md-2 col-sm-4 col-xs-6" style="width: 20%">
                <div class="info-box">
                    <span class="info-box-icon bg-red"><i class="fa fa-usd"></i></span>

                    <div class="info-box-content">
                        <span class="info-box-text">余额</span>
                        <span class="info-box-number">
                            <#if index.agentIndexTop1.balance??>
                                ${index.agentIndexTop1.balance?string('0.00')!}
                            <#else >
                                0.00
                            </#if>
                        </span>
                    </div>
                    <!-- /.info-box-content -->
                </div>
                <!-- /.info-box -->
            </div>
            <div class="col-md-2 col-sm-4 col-xs-6" style="width: 20%">
                <div class="info-box">
                    <span class="info-box-icon bg-red"><i class="fa fa-usd"></i></span>

                    <div class="info-box-content">
                        <span class="info-box-text">师傅总收益</span>
                        <span class="info-box-number">
                            <#if index.agentIndexTop1.masterIncome??>
                                ${index.agentIndexTop1.masterIncome?string('0.00')!}
                            <#else >
                                0.00
                            </#if>
                        </span>
                    </div>
                    <!-- /.info-box-content -->
                </div>
                <!-- /.info-box -->
            </div>
            <div class="col-md-2 col-sm-4 col-xs-6" style="width: 20%">
                <div class="info-box">
                    <span class="info-box-icon bg-red"><i class="fa fa-usd"></i></span>

                    <div class="info-box-content">
                        <span class="info-box-text">师傅余额</span>
                        <span class="info-box-number">
                            <#if index.agentIndexTop1.masterBalance??>
                                ${index.agentIndexTop1.masterBalance?string('0.00')!}
                            <#else >
                                0.00
                            </#if>
                        </span>
                    </div>
                    <!-- /.info-box-content -->
                </div>
                <!-- /.info-box -->
            </div>
            <!-- /.col -->
        </div>
        <!-- /.row -->

        <div class="row">
            <div class="col-md-4">
                <div class="box box-info">
                    <div class="box-header with-border">
                        <h3 class="box-title">今日数据</h3>
                        <div class="box-tools pull-right">
                            <button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i>
                            </button>
                            <button type="button" class="btn btn-box-tool" data-widget="remove"><i class="fa fa-times"></i></button>
                        </div>
                    </div>
                    <!-- /.box-header -->
                    <div class="box-body">
                        <table id="layout-skins-list" class="table table-striped bring-up nth-2-center">
                            <thead>
                            <tr>
                                <th style="width: 50%;"></th>
                                <th></th>
                            </tr>
                            </thead>
                            <tbody>
                            <tr>
                                <td><code>总有效订单</code></td>
                                <td>${index.todayInfo.valid_count !}</td>
                            </tr>
                            <tr>
                                <td><code>跑腿有效订单</code></td>
                                <td>${index.todayInfo.valid_paotui_count !}</td>
                            </tr>
                            <tr>
                                <td><code>服务有效订单</code></td>
                                <td>${index.todayInfo.valid_service_count}</td>
                            </tr>
                            <tr>
                                <td><code>营业额</code></td>
                                <td>
                                    <#if index.todayInfo.amount??>
                                        ${index.todayInfo.amount?string('0.00')!}
                                    <#else >
                                        0.00
                                    </#if>
                                </td>
                            </tr>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
            <div class="col-md-4">
                <div class="box box-warning">
                    <div class="box-header with-border">
                        <h3 class="box-title">昨日订单数据</h3>
                        <div class="box-tools pull-right">
                            <button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i>
                            </button>
                            <button type="button" class="btn btn-box-tool" data-widget="remove"><i class="fa fa-times"></i></button>
                        </div>
                    </div>
                    <!-- /.box-header -->
                    <div class="box-body">
                        <table id="layout-skins-list" class="table table-striped bring-up nth-2-center">
                            <thead>
                            <tr>
                                <th style="width: 50%;"></th>
                                <th></th>
                            </tr>
                            </thead>
                            <tbody>
                            <tr>
                                <td><code>总有效订单</code></td>
                                <td>${index.yestodyInfo.valid_count !}</td>
                            </tr>
                            <tr>
                                <td><code>跑腿有效订单</code></td>
                                <td>${index.yestodyInfo.valid_paotui_count !}</td>
                            </tr>
                            <tr>
                                <td><code>服务有效订单</code></td>
                                <td>${index.yestodyInfo.valid_service_count !}</td>
                            </tr>
                            <tr>
                                <td><code>营业额</code></td>
                                <td>
                                    <#if index.yestodyInfo.amount??>
                                        ${index.yestodyInfo.amount?string('0.00') !}
                                    <#else >
                                        0.00
                                    </#if>
                                </td>
                            </tr>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
            <div class="col-md-4">
                <div class="box box-success">
                    <div class="box-header with-border">
                        <h3 class="box-title">待处理事务</h3>
                        <div class="box-tools pull-right">
                            <button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i>
                            </button>
                            <button type="button" class="btn btn-box-tool" data-widget="remove"><i class="fa fa-times"></i></button>
                        </div>
                    </div>
                    <!-- /.box-header -->
                    <div class="box-body">
                        <table id="layout-skins-list" class="table table-striped bring-up nth-2-center">
                            <thead>
                            <tr>
                                <th style="width: 50%;"></th>
                                <th></th>
                            </tr>
                            </thead>
                            <tbody>
                            <tr>
                                <td><code>待接单</code></td>
                                <td><code>${index.right.wait_order !}</code></td>
                            </tr>
                            <tr>
                                <td><code>待审核商家</code></td>
                                <td><code>${index.right.wait_partner !}</code></td>
                            </tr>
                            <tr>
                                <td><code>待审核师傅</code></td>
                                <td><code>${index.right.wait_master !}</code></td>
                            </tr>
                            <tr>
                                <td><code>待处理投诉</code></td>
                                <td><code>${index.right.wait_complaint !}</code></td>
                            </tr>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
        </div>
        <div class="row">
            <div class="col-md-12">
                <iframe src="/agent/agentOrder?startTime=${startTime!}&endTime=${endTime!}" style="width: 100%;height: 1350px" frameborder="no" border="0" marginwidth="0" marginheight="0" scrolling="no" allowtransparency="yes"></iframe>
            </div>
        </div>
    </section>
    <!-- /.content -->
    <!-- /.content -->
</@layout>